/*
 * InterfaceValidator.java
 *
 * $Id: InterfaceValidator.java,v 1.1 2008-03-18 12:58:46 mario Exp $
 */
package org.ceteca.explica.core.util;

/**
 * Interface with the constant definition of the values used for
 * the format Validator utility class.
 * <br/>
 * @author Mario García García <mario@imagos.es>
 * Copyright (c) 2007 Fundación Centro Tecnolóxico da Carne
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * <br/>
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * <br/>
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
public class InterfaceValidator {
	/* ----------------------------------------------------------------------
     * VALIDATION PATTERNS FOR COMPLEX TYPES FORMAT VALIDATION.
     * ---------------------------------------------------------------------- */ 
    /** Pattern for short date format */
    public static final String CONST_SHORT_DATE_PATTERN = "dd/MM/yyyy";
    
    /** Pattern for long date format */
    public static final String CONST_LONG_DATE_PATTERN = "dd ' de ' MMMMMMMM ' de ' yyyy";
    
    /** Pattern for date and time format */
    public static final String CONST_DATETIME_PATTERN = "dd/MM/yyyy hh:mm";
    
    /** Pattern for short time format */
    public static final String CONST_SHORT_TIME_PATTERN = "hh:mm";
    
    /** Pattern for long time format */
    public static final String CONST_LONG_TIME_PATTERN = "hh:mm:ss:SSS";
    
    /**
     * Pattern for alphabetic string format
     */
    public static final String CONST_ALPHABETIC_PATTERN = "[a-zA-ZñÑáÁéÉíÍóÓúÚüÜ]*";
    
    /**
     * Pattern for alphanumeric string format
     */
    public static final String CONST_ALPHANUMERIC_PATTERN = "[a-zA-ZñÑáÁéÉíÍóÓúÚüÜ0-9]*";
    
    /**
     * Pattern for numeric string format
     */
    public static final String CONST_NUMERIC_PATTERN = "[\\d]*";
    
    /**
     * Pattern for phone number format
     */
    public static final String CONST_PHONENUMBER_PATTERN = "[\\d]{9}";
    
    /**
     * Pattern for postal code format
     */
    public static final String CONST_POSTALCODE_PATTERN = "[\\d]{5}";
    
    /**
     * Pattern for email address format
     */
    public static final String CONST_EMAIL_PATTERN = "[\\w\\W]*[@][\\w\\W]*[.][\\w\\W]*";
    
    /**
     * Pattern for individual date fields numeric format
     */
    public static final String CONST_DATE_PATTERN = "^[0-3][0-9]/[0-1][0-9]/[0-9][0-9][0-9][0-9]$";
    
    /**
     * Pattern for current account number format
     */
    public static final String CONST_CCC_PATTERN = "[\\d]{20}";
    
    /**
	 * Constant with the digit weights for the calculation of the control digits
	 * of a current account
     */
    public static final int[] VAL_DIGIT_WEIGHTS_CCC = {
        1, 2, 4, 8, 5, 10, 9, 7, 3, 6
    };
}
